#include <iostream>

using namespace std;


void PointerTesst(){
	int iv1 = 1024, iv2 = 2048;
	int a[1][2];
	typedef int* intPtr;
	int *pi1 = &iv1, *pi2 = &iv2, **pi3 = new intPtr[2];

	intPtr ipp = new int[2];
	*ipp = 1;
	*(ipp + 1) = 5;

	pi3[0] = ipp; // **pi3: 1, *((*pi3) + 1): 5, *(*pi3 + 1): 5
	pi3[1] = new int[2];
	// iv1 = *pi3; // cannot convert from 'int *' to 'int'
	pi1 = *pi3;
	// *pi2 = *pi3; // cannot convert from 'int *' to 'int'
	iv1 = *pi1;
	// iv1 = pi2; // cannot convert from 'int *' to 'int'
	// pi1 = iv1; // cannot convert from 'int' to 'int *'
	// pi2 = *pi1; // cannot convert from 'int' to 'int *'
	pi3 = &pi2;
}
